﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HanGu.Entity;
using System.ServiceModel;

namespace HanGu.Services.Interface
{
    [ServiceContract(Name = "MemberInfo", Namespace = "http://www.haigu.com/")]
    public interface IMemberInfo
    {
        [OperationContract]
        List<MemberInfo> GetAll();
        [OperationContract]
        List<MemberInfo> GetAllByAssignedIn(int managerID);
        [OperationContract]
        List<MemberInfo> GetAll(UniversallySearchParam searchparma);
        [OperationContract]
        MemberInfo GetByID(int id);
        [OperationContract]
        List<string> GetOganization();
        [OperationContract]
        List<string> GetMemberName(string key = null);
        [OperationContract]
        bool Add(MemberInfo model, List<MemberChildren> sMemberChildren = null, List<MemberContract> sMemberContract = null, List<vwMemberContact> memberContact = null);
        [OperationContract]
        bool Update(MemberInfo model, List<MemberChildren> sMemberChildren = null, List<MemberContract> sMemberContract = null, List<vwMemberContact> memberContact = null);
        [OperationContract]
        bool Delete(int id);
        [OperationContract]
        bool IsLogin(string user, string pwd);
        [OperationContract]
        bool IsUserExits(string user);
        [OperationContract]
        MemberInfo GetByUser(string user);
        [OperationContract]
        int IsResetPwd(string user, string email);
        [OperationContract]
        List<MemberInfo> GetSelectedByGroup(string groupid);
        [OperationContract]
        List<MemberInfo> GetSelectedByIDs(string memberIDs);

        [OperationContract]
        MemberChildren GetChildrenByID(int id);
        [OperationContract]
        List<MemberChildren> GetAllByParent(int parentID);
        [OperationContract]
        bool AddMemberChildren(MemberChildren model);
        [OperationContract]
        bool UpdateMemberChildren(MemberChildren model);
        [OperationContract]
        bool DeleteMemberChildren(int id);

        [OperationContract]
        MemberContract GetContractByID(int id);
        [OperationContract]
        List<MemberContract> GetContractsByParent(int parentID);
        [OperationContract]
        bool AddMemberContract(MemberContract model);
        [OperationContract]
        bool UpdateMemberContract(MemberContract model);
        [OperationContract]
        bool DeleteMemberContract(int id);
        [OperationContract]
        bool DeleteMemberContractByParentID(int ParentID);

        [OperationContract]
        vwMemberContact GetContactByID(int id);
        [OperationContract]
        List<vwMemberContact> GetContactsByParent(UniversallySearchParam searchparma);
        [OperationContract]
        bool AddMemberContact(vwMemberContact model);
        [OperationContract]
        bool UpdateMemberContact(vwMemberContact model);
        [OperationContract]
        bool DeleteMemberContact(int id);
        [OperationContract]
        bool DeleteMemberContactByParentID(int ParentID);
        [OperationContract]
        bool TelExitsed(int id, string tel);

    }
}
